<div class="con-sidebar">
	<h4 class="title">Lastest News</h4>
    <?php if(isset($lastest_news) && $lastest_news->num_rows > 0): ?>
		<?php foreach($lastest_news->result_array() as $row): ?>
        <div class="items">
        	<a href="<?php echo site_url('content/activity/detail/'. $row[field('id')]); ?>" title="<?php echo $row[field('title')]; ?>">
            <img src="<?php echo ACTIVITY_PATH . 'thumbs/' . $row[field('image')]; ?>" class="span4" alt="" />
            <h6><?php echo $row[field('title')]; ?></h6></a>
            <p><?php echo (strlen($row[field('description')]) > 200) ? substr($row[field('description')], 0, 200) . '...' : $row[field('description')]; ?></p>
            <div class="clear"></div>
        </div>
        <?php endforeach; ?>
    <?php else: ?>
	<div class="items">
    	Data does not exists!
    </div>
    <?php endif; ?>
</div>

<div class="con-sidebar">
    <h4 class="title">Follow us on Facebook </h4>
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>    
    <div class="fb-like-box" data-href="http://www.facebook.com/pages/Humanity-Organization-for-Development/307696495916103" data-width="240" data-height="320" data-show-faces="true" data-stream="false" data-show-border="false" data-header="false"></div>
    <div class="clear"></div>
</div> 

<div class="con-sidebar">
    <h4 class="title">Visitors</h4>
    <div>
    	<a href="http://info.flagcounter.com/u3dv"><img src="http://s01.flagcounter.com/count/u3dv/bg_FFFFFF/txt_000000/border_FFFFFF/columns_3/maxflags_12/viewers_3/labels_1/pageviews_1/flags_0/" alt="Flag Counter" border="0"></a>
    </div>
    <div class="clear"></div>
</div> 